The present invention relates to a method for addressing the dynamic windows, and particularly to a method to detect the error message and addressing it when a windows based program is executed.
As computer software applications expand, the need becomes acute to assess the reliability of the software such that appropriate corrective action can be taken prior to releasing the software. Since software products become more and more lengthy and complex, the software product tests also have become more lengthy and complex, requiring ever increasing amounts of time to perform. Assuring the reliability of software by effective testing helps to minimize software development costs, improve software quality, increase productivity, and shorten the software development period.
Nevertheless, it happens that a user run a software program and an unexpected failure of the program takes place suddenly. Even the most carefully designed software typically has defects (xe2x80x9cbugsxe2x80x9d) that cause the software to operate improperly or in an unexpected manner under certain conditions. For example, software xe2x80x9cbugsxe2x80x9d can cause errors such as an incorrect output format or system failure causing serious economic damage.
Generally, testing software includes performing several different tasks. One such task is to generating test programs and test data. Test programs and test data are typically included in a test suite and used to test and verify the correctness of certain aspects of software. For example, test programs are used to test the correctness of an object file produced by a compiler. Another part of software testing includes problem detection. In other words, a technique is used to detect when software does not perform as expected. For example, a compiler compiles a particular computer program and produces an object files that is then linked and incorporated into a machine executable. The machine executable is subsequently executed and produces a corresponding output.
Typically, features of the software program are not totally independent. For example, most software products are constructed using a number of subroutines, calls, branches, loops, and other program techniques. These techniques perform operations that are common to multiple independent portions of the software, and therefore are often repeatedly used by different parts of the program in which they are incorporated. Moreover, if the software program is changed, the tester must tediously change each test case to reflect the changes. One technique used to test the software procedures is by input simulation of a user to test different subroutines, calls, branches or loops. Referring to FIG. 1, an ordinary input simulation of software testing is proceeded. Generally, input characters A, B and C are shown on the screen of monitor sequentially in square 100, 110, 120 when target program operates properly. However, there are still some drawbacks in conventional windows based software with detection problem. Referring now to FIG. 2, the input character A is shown in square 200, when a subsequent character B is input as shown in square 210, the software detects the improper input of this character and normally a pop-up windows will shown as square 220 and disappear all of a sudden. In this specific example, even though the questioning windows 220 is shown for a few moment and the tester also aware of the abnormal situation, the tester can only try to repeat the procedures and have no idea why the defect happened, not to mention correctly and accurately addressing the location of defect.
In light of the above, when a conventional software debugging by the use of manual input simulation such as input by keyboard, it is not easy to correctly and accurately addressing the location of defect. The drawback of this target program detection will reduce the reliability of the software and therefore there is required a new system for software testing which will generate effective test programs in a convenient and efficient manner.
Due to the previous described background that a conventional software testing by manual can not accurately addressing the location of defects (or bugs), it is a main object of the present invention to provide a general and useful method for addressing the displaying dynamic windows, therefore the windows based software can be operated accurately and the message system can be delivered precisely.
It is another object of the present invention to use this general and useful method that the users can write the script by themselves, or generate the script automatically, therefore the management of the windows will be better.
It is a further object of the present invention to use fuzzy technique to reduce the error of judgement.
Summary of the method for addressing the displaying dynamic windows is as follows:
The addressing method of the present invention uses a script interpreter, an addressing identification module and a current windows layer description module combined to realize the invention. Firstly, the script interpreter read in the current operation windows and generates a corresponding description of this windows. Next, the current windows layer description module construct a tree structure to describe every windows. Therefore, the addressing identification module finds the identifier code of the current windows and will handle this addressing windows.
The flow of script interpreter will first input the operational unit such as text, style, identifier and data of windows, then go to the addressing identification module after the counter increase one. Subsequently, the current windows layer description module will hook the creative message and construct a windows description tree structure to describe the windows. The tree structure is built by a sibling and child tree structure.
Afterwards, the addressing identification module calculates the value from the root node of the windows description tree structure and completes the calculation for every node of the tree structure. According to fuzzy identification technique, standard mode will take first and then define the condition according to the attribute of the unit need to be identified. Take the maximum value and the current windows identifier code after calculating every node of the windows description tree structure. Subsequently, a tester can operate this windows.
Due to the addressing method of the present invention, when the tester use a keyboard to simulate the input and defects encountered unexpectedly, the pop-up error message windows will keep on the screen until the user confirm this error.